App({
  onLaunch: function() {},
  getUserInfo: function(t) {
    var a = this;
    this.globalData.userInfo ? "function" == typeof t && t(this.globalData.userInfo) : wx.login({
      success: function(e) {
        e.code && (wx.request({
          url: a.url + "addon/Pubdata/Pubdata/sendCode",
          data: {
            code: e.code,
            PHPSESSID: wx.getStorageSync("PHPSESSID")
          },
          success: function(t) {
            wx.setStorageSync("PHPSESSID", t.data.PHPSESSID), a.globalData.PHPSESSID = t.data.PHPSESSID;
          }
        }), wx.getUserInfo({
          success: function(e) {
            a.globalData.userInfo = e.userInfo, wx.setStorageSync("userInfo", e.userInfo), "function" == typeof t && t(a.globalData.userInfo);
          }
        }));
      },
      fail: function(t) {
        wx.showToast({
          title: "无法连接网络",
          icon: "loading",
          duration: 2500
        });
      }
    });
  },
  WxLogin: function() {
    var t = this;
    wx.login({
      success: function(a) {
        a.code && wx.request({
          url: t.url + "addon/Pubdata/Pubdata/sendCode",
          data: {
            code: a.code,
            PHPSESSID: wx.getStorageSync("PHPSESSID")
          },
          success: function(a) {
            wx.setStorageSync("PHPSESSID", a.data.PHPSESSID), t.globalData.PHPSESSID = a.data.PHPSESSID;
          }
        });
      },
      fail: function(t) {
        wx.showToast({
          title: "无法连接网络",
          icon: "loading",
          duration: 2500
        });
      }
    });
  },
  getWxLogin: function(t) {
    var a = this;
    wx.login({
      success: function(e) {
        e.code && wx.request({
          url: a.url + "addon/Pubdata/Pubdata/sendCode",
          data: {
            code: e.code,
            PHPSESSID: wx.getStorageSync("PHPSESSID")
          },
          success: function(a) {
            wx.setStorageSync("PHPSESSID", a.data.PHPSESSID), "function" == typeof t && t(a.data.PHPSESSID);
          }
        });
      },
      fail: function(t) {
        wx.showToast({
          title: "无法连接网络",
          icon: "loading",
          duration: 2500
        });
      }
    });
  },
  GetUrl: function() {
    if (!this.globalData.SearchUrl || !wx.getStorageSync("CsTelphone")) {
      var t = this;
      wx.request({
        url: this.url + "addon/Urlplant/Urlplant/getHTurl",
        data: {
          id: 1
        },
        method: "GET",
        header: {
          "Content-Type": "application/json",
          Cookie: "PHPSESSID=" + wx.getStorageSync("PHPSESSID")
        },
        success: function(a) {
          t.globalData.SearchUrl = a.data.SearchUrl, t.globalData.ItemrefUrl = a.data.ItemrefUrl,
            t.globalData.ObligrefUrl = a.data.ObligrefUrl, t.globalData.EndrefUrl = a.data.EndrefUrl,
            t.globalData.MdDetailUrl = a.data.MdDetailUrl, t.globalData.weburl = a.data.weburl,
            wx.setStorageSync("CsTelphone", a.data.CsTelphone), wx.setStorageSync("CsEmail", a.data.CsEmail),
            wx.setStorageSync("CsWxnum", a.data.CsWxnum);
        },
        fail: function(t) {}
      });
    }
  },
  globalData: {
    userInfo: null,
    htGet: {},
    OrihtGet: {},
    alternot: "",
    tempDetail: "",
    refcontractlist: [],
    notice: ""
  },
  url: "https://wx.hetongclub.com/index.php?s=/"
});